import {
  request,
  baseURL
} from "../utils/request"

//收藏营地
const collectList = (params) => {
  return request({
    url: "/wechatt/collect/list",
    method: "GET",
    data: params
  })
}

//取消营地
const cancelCollect = (params) => {
  return request({
    url: "/wechatt/collect",
    method: "POST",
    data: params
  })
}
//预约列表
const reservationList = (data) => {
  return request({
    url: "/wechatt/appointment/list",
    method: "GET",
    data
  })
}
//营位id
const getCampsite = (campsiteId) => {
  return request({
    url: `/wechatt/campsite/${campsiteId}`,
    method: "GET",
  })
}
//项目id
const getProject = (projectId) => {
  return request({
    url: `/wechatt/project/getInfoByProjectId/${projectId}`,
    method: "GET",
  })
}
//活动id
const getActivity = (activityId) => {
  return request({
    url: `/wechatt/activity/getInfoByActivityId/${activityId}`,
    method: "GET",
  })
}
//取消预约
const cancelReservation = (id) => {
  return request({
    url: `/wechatt/appointment/${id}`,
    method: "DELETE",
  })
}
export {
  baseURL,
  collectList,
  cancelCollect,
  reservationList,
  cancelReservation,
  getCampsite,
  getProject,
  getActivity,
}